package com.geek.factory.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * 诺诺网发票响应DTO
 */
@Data
@ApiModel("诺诺网发票响应结果")
public class InvoiceResponseDTO {

    @ApiModelProperty("响应码")
    private String code;

    @ApiModelProperty("响应消息")
    private String message;

    @ApiModelProperty("发票数据")
    private InvoiceDataDTO data;

    @Data
    @ApiModel("发票数据")
    public static class InvoiceDataDTO {
        @ApiModelProperty("发票代码")
        private String invoiceCode;

        @ApiModelProperty("校验码")
        private String checkCode;

        @ApiModelProperty("机器码")
        private String machineCode;

        @ApiModelProperty("发票号码")
        private String invoiceNumber;

        @ApiModelProperty("开票日期")
        private String invoiceDate;

        @ApiModelProperty("发票状态")
        private String status;

        @ApiModelProperty("发票PDF地址")
        private String pdfUrl;

        @ApiModelProperty("发票图片地址")
        private String imgUrls;

        @ApiModelProperty("发票明细")
        private List<InvoiceDetailDTO> invoiceDetail;

        @ApiModelProperty("价税合计")
        private String totalAmount;

        @ApiModelProperty("税额")
        private String taxAmount;

        @ApiModelProperty("开票人")
        private String BuyerName;

        @ApiModelProperty("开票人税号")
        private String BuyerTaxNum;

    }

    @Data
    @ApiModel("发票明细响应")
    public static class InvoiceDetailDTO {
        @ApiModelProperty("商品名称")
        private String goodsName;

        @ApiModelProperty("规格型号")
        private String specType;

        @ApiModelProperty("单位")
        private String unit;

        @ApiModelProperty("数量")
        private String num;

        @ApiModelProperty("单价")
        private String price;

        @ApiModelProperty("金额")
        private String amount;

        @ApiModelProperty("税率")
        private String taxRate;

        @ApiModelProperty("税额")
        private String tax;
    }
}
